package org.hospital.pojo;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * TFirPhoto entity. @author MyEclipse Persistence Tools
 */

@Entity
@Table(name="t_fir_photo")
public class TFirPhoto implements java.io.Serializable {

	// Fields
	private Integer photoId;
	//private Integer firId;
	private TFirVisit firVisit;
	private String photoAddr;

	// Constructors
	@ManyToOne(cascade={CascadeType.REFRESH,CascadeType.REMOVE},optional=false) 
	@JoinColumn(name="FIR_ID")
	public TFirVisit getFirVisit() {
		return firVisit;
	}

	public void setFirVisit(TFirVisit firVisit) {
		this.firVisit = firVisit;
	}
	
	/** default constructor */
	public TFirPhoto() {
	}

	/** full constructor */
	public TFirPhoto(String photoAddr) {
		this.photoAddr = photoAddr;
	}

	// Property accessors
	@Id
	@Column(name="PHOTO_ID",insertable=true,nullable=false,updatable=true)
    @GeneratedValue(strategy=GenerationType.AUTO)
	public Integer getPhotoId() {
		return this.photoId;
	}

	public void setPhotoId(Integer photoId) {
		this.photoId = photoId;
	}

//	public Integer getFirId() {
//		return this.firId;
//	}
//
//	public void setFirId(Integer firId) {
//		this.firId = firId;
//	}
	@Column(name="PHOTO_ADDR")
	public String getPhotoAddr() {
		return this.photoAddr;
	}

	public void setPhotoAddr(String photoAddr) {
		this.photoAddr = photoAddr;
	}

}